package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.PracticeMapper;
import com.jobpass.common.model.Practice;
import com.jobpass.common.service.PracticeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class PracticeServiceImpl extends ServiceImpl<PracticeMapper, Practice> implements PracticeService {

    @Resource
    private PracticeMapper practiceMapper;
    @Override
    public List<Practice> FindAllPractice() {
        return practiceMapper.selectList(null);
    }

    @Override
    public Practice FindPracticeById(Long id) {
        return practiceMapper.selectById(id);
    }

    @Override
    public int DeletePracticeById(Long id) {
        return practiceMapper.deleteById(id);
    }

    @Override
    public int UpdatePracticeById(Practice practice) {
        return practiceMapper.updateById(practice);
    }

    @Override
    public int SavaPractice(Practice practice) {
        return practiceMapper.insert(practice);
    }
}
